<?php

namespace scope\local\model;

	function install() {
		
		$client = new \PhpOrient\PhpOrient();
		$client->configure( array(
			'username' => 'root',
			'password' => '!@qwasZX',
			'hostname' => '10.0.0.2',
			'port'     => 2424,
		) );

		$client->connect();

		$client->dbExists( 'my_database' );

		$new_cluster_id = $client->dbCreate( 'omega-cms');

		$ClusterMap = $client->dbOpen( 'omega-cms', 'root', '!@qwasZX' );

		$client->command( 'CREATE CLASS User EXTENDS V' );
		$client->command( 'CREATE CLASS LocalUser EXTENDS User' );

		$client->command( 'CREATE CLASS View EXTENDS V' );

		$client->command( 'CREATE CLASS Group EXTENDS View' );
		$client->command( 'CREATE CLASS LocalGroup EXTENDS Group' );

		$client->command( 'CREATE CLASS Zone EXTENDS View' );
		$client->command( 'CREATE CLASS Country EXTENDS Zone' );
		$client->command( 'CREATE CLASS State EXTENDS Zone' );
		$client->command( 'CREATE CLASS County EXTENDS Zone' );
		$client->command( 'CREATE CLASS City EXTENDS Zone' );
		$client->command( 'CREATE CLASS Location EXTENDS Zone' );

		$client->command( 'CREATE CLASS Tag EXTENDS View' );
		$client->command( 'CREATE CLASS Noun EXTENDS Tag' );
		$client->command( 'CREATE CLASS Verb EXTENDS Tag' );
		$client->command( 'CREATE CLASS Adjective EXTENDS Tag' );
		$client->command( 'CREATE CLASS Adverb EXTENDS Tag' );

		$client->command( 'CREATE CLASS Trust EXTENDS V' );
		$client->command( 'CREATE CLASS LocalPost EXTENDS Trust' );
		$client->command( 'CREATE CLASS LocalJob EXTENDS Trust' );

		$client->command( 'CREATE CLASS Love EXTENDS V' );
		$client->command( 'CREATE CLASS LocalMessage EXTENDS Love' );
		$client->command( 'CREATE CLASS LocalCritique EXTENDS Love' );

		$client->command( 'CREATE CLASS Connection EXTENDS E' );
		$client->command( 'CREATE CLASS ResidentOf EXTENDS Connection' );
		$client->command( 'CREATE CLASS VisitorOf EXTENDS Connection' );
		$client->command( 'CREATE CLASS MemberOf EXTENDS Connection' );
		$client->command( 'CREATE CLASS LeaderOf EXTENDS Connection' );
		$client->command( 'CREATE CLASS CreatorOf EXTENDS Connection' );
		$client->command( 'CREATE CLASS FriendOf EXTENDS Connection' );
		$client->command( 'CREATE CLASS SameAs EXTENDS Connection' );
		$client->command( 'CREATE CLASS NeighborOf EXTENDS Connection' );

		$client->command( 'CREATE CLASS Inspiration EXTENDS E' );
		$client->command( 'CREATE CLASS Likes EXTENDS Inspiration' );
	
		install_zones();
		
	} 

	function install_zones() {
		
		
		
		
		
	}
?>
